package org.aaron.wbclient.utils;

import java.util.HashMap;
import java.util.Map;

public class StringUtils {
	/**
	 * 获取baseString串里的键值对封装为MAP集合
	 * 
	 * @param baseString
	 * @return
	 */
	public static Map<String, String> parseMapFromString(String baseString) {
		String[] arr = baseString.split(",");
		Map<String, String> result = new HashMap<String, String>();
		for (int i = 0; i < arr.length; i++) {
			String temp[] = arr[i].split("=");
			String key = temp[0].trim();
			String value = temp[1].substring(1, temp[1].length() - 1);
			result.put(key, value);
		}
		return result;
	}
}
